<!DOCTYPE>
<html>
	<head>
		<script src="https://github.com/typicaljoe/taffydb/raw/master/taffy.js"></script>
		<script>
			// We create database in-memory
			var cities = TAFFY([{currency:"EUR",rate:"1.00"}, {currency:"HUF",rate:"315.00"}]);
			// We insert some values
			cities.insert({currency:"KUN",rate:"7.50"});

			// FUNCTIONS
			// count()
			alert(cities({currency:"HUF"}).count());
			// each()
			cities().limit(2).each(function (r) {alert(r.currency);});

			cities({currency:"HUF"}).update({rate:"312.00"});

			alert(cities({currency:"HUF"}).first().rate);

			alert(cities().order("rate").first().currency);

			
		</script>
	</head>
	<body>
	</body>
</html>
